set(vapoursynth_pkgconfig_libs "-lVapourSynth -Wl,-delayload=VapourSynth.dll")
set(vapoursynth_script_pkgconfig_libs "-lVSScript -Wl,-delayload=VSScript.dll")

if(TARGET_CPU STREQUAL "x86_64")
    set(dlltool_image "i386:x86-64")
    set(openssl_target "mingw64")
    set(libvpx_target "x86_64-win64-gcc")
    set(xxhash_dispatch "-DDISPATCH=ON")
    set(mimalloc_macro "-D_M_X64")
    if(MARCH_HAS_AVX)
        set(aom_vpx_sse2avx
            COMMAND ${EXEC} sed -i [['/%macro INIT_XMM/,/%endmacro/ s/%assign avx_enabled 0/%assign avx_enabled 1/']] <SOURCE_DIR>/third_party/x86inc/x86inc.asm
        )
        set(x265_sse2avx
            COMMAND ${EXEC} ninja -C <BINARY_DIR>/12b common/CMakeFiles/common.dir/x86/intrapred16.asm.obj
            COMMAND ${EXEC} sed -i [['/%macro INIT_XMM/,/%endmacro/ s/%assign avx_enabled 0/%assign avx_enabled 1/']] <SOURCE_DIR>/source/common/x86/x86inc.asm
        )
        set(novzeroupper
            COMMAND ${EXEC} sed -i [['s/%define vzeroupper_required .*/%define vzeroupper_required 0/']]
        )
        set(libjxl_disable_sse
            -DJPEGXL_ENABLE_HWY_SSE2=OFF
            -DJPEGXL_ENABLE_HWY_SSE4=OFF
        )
        set(ffmpeg_nosse2avx
            COMMAND ${MAKE} libswscale/x86/ops_int.o _NASM_SSE2AVX=0
        )
    else()
        set(novzeroupper
            COMMAND true
        )
        set(ffmpeg_nosse2avx
            COMMAND true
        )
    endif()
    set(libjxl_force_skip_check
        -DCXX_MAVX2_SUPPORTED=ON
        -DCXX_MF16C_SUPPORTED=ON
        -DCXX_MAVX512F_SUPPORTED=ON
        -DCXX_MAVX512DQ_SUPPORTED=ON
        -DCXX_MAVX512CD_SUPPORTED=ON
        -DCXX_MAVX512BW_SUPPORTED=ON
        -DCXX_MAVX512VL_SUPPORTED=ON
        -DCXX_SVE_SUPPORTED=OFF
    )
    set(openal_force_skip_check
        -DHAVE_ARM_NEON_H=OFF
        -DHAVE_EMMINTRIN_H=ON
        -DHAVE_MSSE2_SWITCH=ON
        -DHAVE_PMMINTRIN_H=ON
        -DHAVE_SMMINTRIN_H=ON
        -DHAVE_SSE_INTRINSICS=ON
        -DHAVE_XMMINTRIN_H=ON
        -DHAVE_GCC_GET_CPUID=ON
        -DHAVE_CPUID_H=ON
        -DHAVE_CPUID_INTRINSIC=ON
    )
    set(libwebp_force_skip_check
        -DWEBP_HAVE_FLAG_AVX2=ON
        -DWEBP_HAVE_FLAG_SSE41=ON
        -DWEBP_HAVE_FLAG_SSE2=ON
        -DWEBP_HAVE_FLAG_NEON=OFF
    )
    set(zlib_force_skip_check
        -DHAVE_XSAVE_INTRIN=ON
        -DHAVE_SSE2_INTRIN=ON
        -DHAVE_SSSE3_INTRIN=ON
        -DHAVE_SSE41_INTRIN=ON
        -DHAVE_SSE42_INTRIN=ON
        -DHAVE_PCLMULQDQ_INTRIN=ON
        -DHAVE_AVX2_INTRIN=ON
        -DHAVE_AVX512_INTRIN=ON
        -DHAVE_AVX512VNNI_INTRIN=ON
        -DHAVE_VPCLMULQDQ_INTRIN=ON
        -DHAVE_CASCADE_LAKE=ON
        -DHAVE_ARM_ACLE_H=OFF
    )
    set(svtav1_force_skip_check
        -DHAVE_X86_PLATFORM=ON
        -DHAVE_ARM_PLATFORM=OFF
        -DCXX_FLAG_mavx2=ON
        -DCXX_FLAG_mavx512bw=ON
        -DCXX_FLAG_mavx512dq=ON
        -DCXX_FLAG_mavx512f=ON
        -DCXX_FLAG_mavx512vl=ON
        -DCXX_FLAG_msse2=ON
        -DCXX_FLAG_msse4_1=ON
        -DCXX_FLAG_mssse3=ON
        -DC_FLAG_mavx2=ON
        -DC_FLAG_mavx512bw=ON
        -DC_FLAG_mavx512dq=ON
        -DC_FLAG_mavx512f=ON
        -DC_FLAG_mavx512vl=ON
        -DC_FLAG_msse2=ON
        -DC_FLAG_msse4_1=ON
        -DC_FLAG_mssse3=ON
        -DC_FLAG_mxsave=ON
        -DHAS_AVX512=ON
    )
    set(libsdl2_force_skip_check
        -DCHECK_CPU_ARCHITECTURE_X64=ON
        -DCHECK_CPU_ARCHITECTURE_ARM64=OFF
    )
    set(xz_force_skip_check
        -DHAVE_ARM64_CRC32=OFF
        -DHAVE_USABLE_CLMUL=ON
        -DHAVE__MM_MOVEMASK_EPI8=ON
        -DHAVE_CPUID_H=ON
        -DHAVE_IMMINTRIN_H=ON
    )
elseif(TARGET_CPU STREQUAL "aarch64")
    set(dlltool_image "arm64")
    set(openssl_target "mingwarm64")
    set(libvpx_target "arm64-win64-gcc")
    set(novzeroupper
        COMMAND true
    )
    set(ffmpeg_nosse2avx
        COMMAND true
    )
    set(libjxl_force_skip_check
        -DCXX_MAVX2_SUPPORTED=OFF
        -DCXX_MF16C_SUPPORTED=OFF
        -DCXX_MAVX512F_SUPPORTED=OFF
        -DCXX_MAVX512DQ_SUPPORTED=OFF
        -DCXX_MAVX512CD_SUPPORTED=OFF
        -DCXX_MAVX512BW_SUPPORTED=OFF
        -DCXX_MAVX512VL_SUPPORTED=OFF
        -DCXX_SVE_SUPPORTED=ON
    )
    set(openal_force_skip_check
        -DHAVE_ARM_NEON_H=ON
        -DHAVE_NEON_INTRINSICS=ON
        -DHAVE_EMMINTRIN_H=OFF
        -DHAVE_MSSE2_SWITCH=OFF
        -DHAVE_PMMINTRIN_H=OFF
        -DHAVE_SMMINTRIN_H=OFF
        -DHAVE_SSE_INTRINSICS=OFF
        -DHAVE_XMMINTRIN_H=OFF
        -DHAVE_GCC_GET_CPUID=OFF
        -DHAVE_CPUID_H=OFF
        -DHAVE_CPUID_INTRINSIC=OFF
    )
    set(libwebp_force_skip_check
        -DWEBP_HAVE_FLAG_AVX2=OFF
        -DWEBP_HAVE_FLAG_SSE41=OFF
        -DWEBP_HAVE_FLAG_SSE2=OFF
        -DWEBP_HAVE_FLAG_NEON=ON
    )
    set(zlib_force_skip_check
        -DHAVE_XSAVE_INTRIN=OFF
        -DHAVE_SSE2_INTRIN=OFF
        -DHAVE_SSSE3_INTRIN=OFF
        -DHAVE_SSE41_INTRIN=OFF
        -DHAVE_SSE42_INTRIN=OFF
        -DHAVE_PCLMULQDQ_INTRIN=OFF
        -DHAVE_AVX2_INTRIN=OFF
        -DHAVE_AVX512_INTRIN=OFF
        -DHAVE_AVX512VNNI_INTRIN=OFF
        -DHAVE_VPCLMULQDQ_INTRIN=OFF
        -DHAVE_CASCADE_LAKE=OFF
        -DHAVE_ARM_ACLE_H=ON
        -DHAVE_MARCH_ARMV8_CRC=ON
        -DHAVE_ARMV8_INTRIN=ON
        -DNEON_AVAILABLE=ON
        -DNEON_HAS_LD4=ON
        -DHAVE_ARMV8_INLINE_ASM=OFF
    )
    set(svtav1_force_skip_check
        -DHAVE_X86_PLATFORM=OFF
        -DHAVE_ARM_PLATFORM=ON
        -DHAS_AVX512=OFF
        -DC_FLAG_mxsave=OFF
        -DNEON_FLAG_SUPPORTED=ON
        -DARM_CRC32_FLAG_SUPPORTED=ON
        -DNEON_DOTPROD_FLAG_SUPPORTED=ON
        -DNEON_I8MM_FLAG_SUPPORTED=ON
        -DSVE_FLAG_SUPPORTED=ON
        -DSVE2_FLAG_SUPPORTED=ON
        -DHAVE_SVE_HEADERS=ON
        -DCAN_COMPILE_SVE=ON
        -DCXX_FLAG_march_armv8_2_a_dotprod=ON
        -DCXX_FLAG_march_armv8_2_a_dotprod_i8mm=ON
        -DCXX_FLAG_march_armv8_2_a_dotprod_i8mm_sve=ON
        -DCXX_FLAG_march_armv9_a_i8mm_sve2=ON
        -DC_FLAG_march_armv8_2_a_dotprod=ON
        -DC_FLAG_march_armv8_2_a_dotprod_i8mm=ON
        -DC_FLAG_march_armv8_2_a_dotprod_i8mm_sve=ON
        -DC_FLAG_march_armv9_a_i8mm_sve2=ON
    )
    set(libsdl2_force_skip_check
        -DCHECK_CPU_ARCHITECTURE_X64=OFF
        -DCHECK_CPU_ARCHITECTURE_ARM64=ON
    )
    set(xz_force_skip_check
        -DHAVE_ARM64_CRC32=ON
        -DTUKLIB_FAST_UNALIGNED_DEFINED_BY_PREPROCESSOR=ON
        -DHAVE_USABLE_CLMUL=OFF
        -DHAVE__MM_MOVEMASK_EPI8=OFF
        -DHAVE_CPUID_H=OFF
        -DHAVE_IMMINTRIN_H=OFF
    )
endif()

set(cmake_conf_args
    -GNinja
    -DCMAKE_BUILD_TYPE=Release
    -DCMAKE_INSTALL_PREFIX=${MINGW_INSTALL_PREFIX}
    -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}
    -DBUILD_SHARED_LIBS=OFF
    -DBUILD_TESTING=OFF
    -DCMAKE_C_STANDARD=17
    -DCMAKE_CXX_STANDARD=20
    -DCMAKE_POLICY_VERSION_MINIMUM=3.5
    -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
)
set(meson_conf_args
    --cross-file=${MESON_CROSS}
    --native-file=${MESON_NATIVE}
)
set(autoshit_confuck_args
    --host=${TARGET_ARCH}
    --prefix=${MINGW_INSTALL_PREFIX}
    --disable-shared
    --enable-static
    --disable-dependency-tracking
)
set(autoreshit
    COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR> <BINARY_DIR>
    COMMAND ${EXEC} autoreconf -fi
)
set(qt_target_features
    -DQT_FEATURE_brotli=ON
    -DQT_FEATURE_cpp_winrt=ON
    -DQT_FEATURE_cxx20=ON
    -DQT_FEATURE_egl=OFF
    -DQT_FEATURE_fontconfig=OFF
    -DQT_FEATURE_harfbuzz=ON
    -DQT_FEATURE_imageformat_jpeg=OFF
    -DQT_FEATURE_intelcet=OFF
    -DQT_FEATURE_jpeg=OFF
    -DQT_FEATURE_libcpp_hardening=OFF
    -DQT_FEATURE_networklistmanager=OFF
    -DQT_FEATURE_openssl_linked=ON
    -DQT_FEATURE_openssl_runtime=OFF
    -DQT_FEATURE_openssl=ON
    -DQT_FEATURE_pkg_config=ON
    -DQT_FEATURE_printsupport=OFF
    -DQT_FEATURE_qmake=OFF
    -DQT_FEATURE_relocatable=ON
    -DQT_FEATURE_sql_mysql=OFF
    -DQT_FEATURE_sql_odbc=ON
    -DQT_FEATURE_sql_psql=OFF
    -DQT_FEATURE_stack_protector=OFF
    -DQT_FEATURE_static_runtime=OFF
    -DQT_FEATURE_system_freetype=ON
    -DQT_FEATURE_system_harfbuzz=ON
    -DQT_FEATURE_system_openssl=ON
    -DQT_FEATURE_system_png=ON
    -DQT_FEATURE_system_sqlite=OFF
    -DQT_FEATURE_system_webp=ON
    -DQT_FEATURE_system_zlib=ON
    -DQT_FEATURE_test_gui=OFF
    -DQT_FEATURE_testlib=OFF
    -DQT_FEATURE_trivial_auto_var_init_pattern=OFF
    -DQT_FEATURE_vulkan=ON
    -DQT_FEATURE_wasmdeployqt=OFF
    -DQT_FEATURE_winsdkicu=ON
    -DQT_FEATURE_zstd=ON
)

set(qt_force_skip_check
    -DHAVE_atomicfptr=ON
    -DHAVE_cxx_std_async_noncopyable=ON
    -DHAVE_cxx17_filesystem=ON
    -DHAVE_cxx20_format=ON
    -DHAVE_d2d1_1=ON
    -DHAVE_d2d1=ON
    -DHAVE_directwrite=ON
    -DHAVE_directwrite3=ON
    -DHAVE_dtls=ON
    -DHAVE_evdev=OFF
    -DHAVE_fsnotify=OFF
    -DHAVE_GLESv2=OFF
    -DHAVE_glibc=OFF
    -DHAVE_inotify=OFF
    -DHAVE_LD_VERSION_SCRIPT=OFF
    -DHAVE_LIBRESOLV_FUNCTIONS=OFF
    -DHAVE_linkat=OFF
    -DHAVE_linuxfb=OFF
    -DHAVE_ocsp=OFF
    -DHAVE_OpenGLES=OFF
    -DHAVE_opensslv11_headers=OFF
    -DHAVE_opensslv11=OFF
    -DHAVE_poll=OFF
    -DHAVE_pollts=OFF
    -DHAVE_posix_fallocate=OFF
    -DHAVE_posix_sem=OFF
    -DHAVE_ppoll=OFF
    -DHAVE_sctp=OFF
    -DHAVE_STDATOMIC=ON
    -DHAVE_sysv_sem=OFF
    -DHAVE_using_stdlib_libcpp=ON
    -DHAVE_vxworksevdev=OFF
    -DTEST_enable_new_dtags=OFF
    -DTEST_gdb_index=OFF
    -DTEST_LOONGARCHSIMD_LASX=OFF
    -DTEST_LOONGARCHSIMD_LSX=OFF
    -DTEST_optimize_debug=ON
    -DTEST_stack_protector=OFF
    -DTEST_trivial_auto_var_init_pattern=OFF
    -DTEST_use_bfd_linker=OFF
    -DTEST_use_gold_linker=OFF
    -DTEST_use_lld_linker=OFF
    -DTEST_use_mold_linker=OFF
    -DCMAKE_DISABLE_FIND_PACKAGE_ATSPI2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Backtrace=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Cups=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_DB2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_DirectFB=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_EGL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Fontconfig=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_gbm=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GLESv2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GLIB2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GTK3=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Interbase=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_JeMalloc=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libb2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libdrm=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libinput=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libproxy=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libsystemd=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libudev=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_LTTngUST=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Mimer=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Mtdev=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_MySQL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Oracle=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_PlatformGraphics=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_PostgreSQL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_RenderDoc=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Slog2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_SQLite3=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Tslib=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Client=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Cursor=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Egl=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Server=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WaylandScanner=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapDBus1=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapResolv=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapRt=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemDoubleConversion=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemJpeg=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemMd4c=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemPCRE2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_X11_XCB=ON
)

set(qthost_force_skip_check
    -DCMAKE_HAVE_LIBC_PTHREAD=ON
    -DHAVE_atomicfptr=ON
    -DHAVE_cxx_std_async_noncopyable=ON
    -DHAVE_cxx17_filesystem=ON
    -DHAVE_cxx20_format=ON
    -DHAVE_LD_VERSION_SCRIPT=ON
    -DHAVE_opensslv11_headers=OFF
    -DHAVE_opensslv11=OFF
    -DHAVE_opensslv30_headers=OFF
    -DHAVE_opensslv30=OFF
    -DHAVE_STDATOMIC=ON
    -DHAVE_using_stdlib_libcpp=OFF
    -DHAVE_winsdkicu=OFF
    -DTEST_enable_new_dtags=ON
    -DTEST_gdb_index=ON
    -DTEST_LOONGARCHSIMD_LASX=OFF
    -DTEST_LOONGARCHSIMD_LSX=OFF
    -DTEST_opensslv11_headers=OFF
    -DTEST_opensslv11=OFF
    -DTEST_opensslv30_headers=OFF
    -DTEST_opensslv30=OFF
    -DTEST_optimize_debug=ON
    -DTEST_relro_now_linker=ON
    -DTEST_stack_protector=OFF
    -DTEST_trivial_auto_var_init_pattern=OFF
    -DTEST_use_bfd_linker=OFF
    -DTEST_use_gold_linker=OFF
    -DTEST_use_lld_linker=ON
    -DTEST_use_mold_linker=OFF
    -DCMAKE_DISABLE_FIND_PACKAGE_ATSPI2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Backtrace=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Cups=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_DB2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_DirectFB=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_EGL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Fontconfig=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_gbm=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GLESv2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GLIB2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GTK3=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Interbase=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_JeMalloc=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libb2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libdrm=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libinput=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libproxy=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libsystemd=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libudev=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libudev=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_LTTngUST=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Mimer=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Mtdev=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_MySQL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Oracle=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_PlatformGraphics=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_PostgreSQL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Network=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6OpenGL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6OpenGLWidgets=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6PrintSupport=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Qml=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6QmlLSPrivate=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Quick=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6QuickLayouts=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6QuickWidgets=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Sql=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Widgets=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt6Xml=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_RenderDoc=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Slog2=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_SQLite3=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Tslib=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Client=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Cursor=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Egl=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland_Server=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Wayland=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WaylandScanner=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapBacktrace=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapDBus1=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapLibClang=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapOpenSSL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapOpenSSLHeaders=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapPNG=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapResolv=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapRt=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemDoubleConversion=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemJpeg=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemMd4c=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapSystemPNG=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_WrapZSTD=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_X11_XCB=ON
)

set(trim_path
    COMMAND ${EXEC} sed -i
    -e 's|${MINGW_INSTALL_PREFIX}|${TARGET_ARCH}|g'
    -e 's|${SINGLE_SOURCE_LOCATION}|soucre|g'
    -e 's|${PROJECT_BINARY_DIR}|build|g'
)

if(QT_DISABLE_CCACHE)
    set(qt_disable_ccache 1)
    set(qt_unity
        -DQT_UNITY_BUILD=ON
        -DQT_UNITY_BUILD_BATCH_SIZE=16
    )
else()
    set(qt_disable_ccache 0)
    set(qt_unity -DQT_UNITY_BUILD=OFF)
endif()

set(libarchive_force_skip_check
    -DARCHIVE_CRYPTO_MD5_OPENSSL=OFF
    -DARCHIVE_CRYPTO_RMD160_OPENSSL=OFF
    -DARCHIVE_CRYPTO_SHA1_OPENSSL=OFF
    -DARCHIVE_CRYPTO_SHA256_OPENSSL=OFF
    -DARCHIVE_CRYPTO_SHA384_OPENSSL=OFF
    -DARCHIVE_CRYPTO_SHA512_OPENSSL=OFF
    -DHAVE_OPENSSL_EVP_H=OFF
    -DHAVE_OPENSSL_OPENSSLV_H=OFF
    -DHAVE_LIBZSTD=ON
    -DHAVE_ZSTD_compressStream=ON
    -DHAVE_ZSTD_minCLevel=ON
    -DHAVE_CTIME_S=ON
    -DHAVE_CTYPE_H=ON
    -DHAVE_DECL_INT32_MAX=ON
    -DHAVE_DECL_INT32_MIN=ON
    -DHAVE_DECL_INT64_MAX=ON
    -DHAVE_DECL_INT64_MIN=ON
    -DHAVE_DECL_INTMAX_MAX=ON
    -DHAVE_DECL_INTMAX_MIN=ON
    -DHAVE_DECL_SIZE_MAX=ON
    -DHAVE_DECL_SSIZE_MAX=ON
    -DHAVE_DECL_UINT32_MAX=ON
    -DHAVE_DECL_UINT64_MAX=ON
    -DHAVE_DECL_UINTMAX_MAX=ON
    -DHAVE_DEV_T=ON
    -DHAVE_DIRECT_H=ON
    -DHAVE_DIRENT_H=ON
    -DHAVE_EILSEQ=ON
    -DHAVE_ERRNO_H=ON
    -DHAVE_FCNTL_H=ON
    -DHAVE_FSEEKO=ON
    -DHAVE_FSTAT=ON
    -DHAVE_FTRUNCATE=ON
    -DHAVE_GETPID=ON
    -DHAVE_GMTIME_S=ON
    -DHAVE_ICONV_libc_const=ON
    -DHAVE_INT16_T=ON
    -DHAVE_INT32_T=ON
    -DHAVE_INT64_T=ON
    -DHAVE_INTMAX_T=ON
    -DHAVE_INTPTR_T=ON
    -DHAVE_INTTYPES_H=ON
    -DHAVE_IO_H=ON
    -DHAVE_LIBXML_XMLREADER_H=ON
    -DHAVE_LIBXML_XMLVERSION_H=ON
    -DHAVE_LIBXML_XMLWRITER_H=ON
    -DHAVE_LIMITS_H=ON
    -DHAVE_LOCALCHARSET_H=ON
    -DHAVE_LOCALE_H=ON
    -DHAVE_LOCALTIME_S=ON
    -DHAVE_LZMA_STREAM_ENCODER_MT=ON
    -DHAVE_MBRTOWC=ON
    -DHAVE_MEMMOVE=ON
    -DHAVE_MEMORY_H=ON
    -DHAVE_MKDIR=ON
    -DHAVE_MKSTEMP=ON
    -DHAVE_MODE_T=ON
    -DHAVE_OFF_T=ON
    -DHAVE_PID_T=ON
    -DHAVE_PKCS5_PBKDF2_HMAC_SHA1=ON
    -DHAVE_PROCESS_H=ON
    -DHAVE_SELECT=ON
    -DHAVE_SETLOCALE=ON
    -DHAVE_SIGNAL_H=ON
    -DHAVE_SIZEOF_INT=ON
    -DHAVE_SIZEOF_LONG=ON
    -DHAVE_SIZEOF_LONG_LONG=ON
    -DHAVE_SIZEOF_SHORT=ON
    -DHAVE_SIZEOF_UNSIGNED=ON
    -DHAVE_SIZEOF_UNSIGNED_LONG=ON
    -DHAVE_SIZEOF_UNSIGNED_LONG_LONG=ON
    -DHAVE_SIZEOF_UNSIGNED_SHORT=ON
    -DHAVE_SIZEOF_WCHAR_T=ON
    -DHAVE_SIZE_T=ON
    -DHAVE_SSIZE_T=ON
    -DHAVE_STDARG_H=ON
    -DHAVE_STDDEF_H=ON
    -DHAVE_STDINT_H=ON
    -DHAVE_STDLIB_H=ON
    -DHAVE_STRCHR=ON
    -DHAVE_STRDUP=ON
    -DHAVE_STRERROR=ON
    -DHAVE_STRFTIME=ON
    -DHAVE_STRINGS_H=ON
    -DHAVE_STRING_H=ON
    -DHAVE_STRNCPY_S=ON
    -DHAVE_STRNLEN=ON
    -DHAVE_STRRCHR=ON
    -DHAVE_SYS_CDEFS_H=ON
    -DHAVE_SYS_PARAM_H=ON
    -DHAVE_SYS_STAT_H=ON
    -DHAVE_SYS_TIME_H=ON
    -DHAVE_SYS_TYPES_H=ON
    -DHAVE_SYS_UTIME_H=ON
    -DHAVE_TIME_H=ON
    -DHAVE_TZSET=ON
    -DHAVE_UINT16_T=ON
    -DHAVE_UINT32_T=ON
    -DHAVE_UINT64_T=ON
    -DHAVE_UINT8_T=ON
    -DHAVE_UINTMAX_T=ON
    -DHAVE_UINTPTR_T=ON
    -DHAVE_UNISTD_H=ON
    -DHAVE_UNSIGNED___INT64=ON
    -DHAVE_UTIME=ON
    -DHAVE_UTIME_H=ON
    -DHAVE_VISIBILITY_ATTR=ON
    -DHAVE_VPRINTF=ON
    -DHAVE_WCHAR_H=ON
    -DHAVE_WCRTOMB=ON
    -DHAVE_WCSCMP=ON
    -DHAVE_WCSCPY=ON
    -DHAVE_WCSLEN=ON
    -DHAVE_WCTOMB=ON
    -DHAVE_WCTYPE_H=ON
    -DHAVE_WINCRYPT_H=ON
    -DHAVE_WINDOWS_H=ON
    -DHAVE_WINIOCTL_H=ON
    -DHAVE_WMEMCMP=ON
    -DHAVE_WMEMCPY=ON
    -DHAVE_WMEMMOVE=ON
    -DHAVE__CrtSetReportMode=ON
    -DHAVE__FSEEKI64=ON
    -DHAVE__GET_TIMEZONE=ON
    -DHAVE__MKGMTIME=ON
    -DHAVE___INT64=ON
    -DGID_T=OFF
    -DHAVE_ACL_LIBACL_H=OFF
    -DHAVE_ARC4RANDOM_BUF=OFF
    -DHAVE_ATTR_XATTR_H=OFF
    -DHAVE_CHFLAGS=OFF
    -DHAVE_CHOWN=OFF
    -DHAVE_CHROOT=OFF
    -DHAVE_CLOSEFROM=OFF
    -DHAVE_CLOSE_RANGE=OFF
    -DHAVE_COPYFILE_H=OFF
    -DHAVE_CTIME_R=OFF
    -DHAVE_CYGWIN_CONV_PATH=OFF
    -DHAVE_DECL_EXTATTR_NAMESPACE_USER=OFF
    -DHAVE_DECL_XATTR_NOFOLLOW=OFF
    -DHAVE_DIRFD=OFF
    -DHAVE_DLFCN_H=OFF
    -DHAVE_D_MD_ORDER=OFF
    -DHAVE_EFTYPE=OFF
    -DHAVE_EXT2FS_EXT2_FS_H=OFF
    -DHAVE_FCHDIR=OFF
    -DHAVE_FCHFLAGS=OFF
    -DHAVE_FCHMOD=OFF
    -DHAVE_FCHOWN=OFF
    -DHAVE_FCNTL=OFF
    -DHAVE_FDOPENDIR=OFF
    -DHAVE_FNMATCH=OFF
    -DHAVE_FNMATCH_H=OFF
    -DHAVE_FORK=OFF
    -DHAVE_FSTATAT=OFF
    -DHAVE_FSTATFS=OFF
    -DHAVE_FSTATVFS=OFF
    -DHAVE_FUTIMENS=OFF
    -DHAVE_FUTIMES=OFF
    -DHAVE_FUTIMESAT=OFF
    -DHAVE_GETEUID=OFF
    -DHAVE_GETGRGID_R=OFF
    -DHAVE_GETGRNAM_R=OFF
    -DHAVE_GETLINE=OFF
    -DHAVE_GETPWNAM_R=OFF
    -DHAVE_GETPWUID_R=OFF
    -DHAVE_GETVFSBYNAME=OFF
    -DHAVE_GID_T=OFF
    -DHAVE_GMTIME_R=OFF
    -DHAVE_GRP_H=OFF
    -DHAVE_ID_T=OFF
    -DHAVE_LANGINFO_H=OFF
    -DHAVE_LCHFLAGS=OFF
    -DHAVE_LCHMOD=OFF
    -DHAVE_LCHOWN=OFF
    -DHAVE_LIBATTR=OFF
    -DHAVE_LIBATTR_GNU=OFF
    -DHAVE_LINK=OFF
    -DHAVE_LINKAT=OFF
    -DHAVE_LINUX_FIEMAP_H=OFF
    -DHAVE_LINUX_FS_H=OFF
    -DHAVE_LINUX_MAGIC_H=OFF
    -DHAVE_LINUX_TYPES_H=OFF
    -DHAVE_LOCALTIME_R=OFF
    -DHAVE_LSTAT=OFF
    -DHAVE_LUTIMES=OFF
    -DHAVE_MEMBERSHIP_H=OFF
    -DHAVE_MKFIFO=OFF
    -DHAVE_MKNOD=OFF
    -DHAVE_NL_LANGINFO=OFF
    -DHAVE_OPENAT=OFF
    -DHAVE_PATHS_H=OFF
    -DHAVE_PIPE=OFF
    -DHAVE_POLL=OFF
    -DHAVE_POLL_H=OFF
    -DHAVE_POSIX_SPAWNP=OFF
    -DHAVE_PTHREAD_H=OFF
    -DHAVE_PWD_H=OFF
    -DHAVE_READLINK=OFF
    -DHAVE_READLINKAT=OFF
    -DHAVE_READPASSPHRASE=OFF
    -DHAVE_READPASSPHRASE_H=OFF
    -DHAVE_REGEX_H=OFF
    -DHAVE_SETENV=OFF
    -DHAVE_SIGACTION=OFF
    -DHAVE_SPAWN_H=OFF
    -DHAVE_STATFS=OFF
    -DHAVE_STATVFS=OFF
    -DHAVE_STRERROR_R=OFF
    -DHAVE_STRUCT_STATFS=OFF
    -DHAVE_STRUCT_STAT_ST_BIRTHTIME=OFF
    -DHAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC=OFF
    -DHAVE_STRUCT_STAT_ST_BLKSIZE=OFF
    -DHAVE_STRUCT_STAT_ST_FLAGS=OFF
    -DHAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC=OFF
    -DHAVE_STRUCT_STAT_ST_MTIME_N=OFF
    -DHAVE_STRUCT_STAT_ST_MTIME_USEC=OFF
    -DHAVE_STRUCT_STAT_ST_MTIM_TV_NSEC=OFF
    -DHAVE_STRUCT_STAT_ST_UMTIME=OFF
    -DHAVE_STRUCT_TM_TM_GMTOFF=OFF
    -DHAVE_STRUCT_TM___TM_GMTOFF=OFF
    -DHAVE_STRUCT_VFSCONF=OFF
    -DHAVE_STRUCT_XVFSCONF=OFF
    -DHAVE_SYMLINK=OFF
    -DHAVE_SYSCONF=OFF
    -DHAVE_SYS_ACL_H=OFF
    -DHAVE_SYS_EXTATTR_H=OFF
    -DHAVE_SYS_IOCTL_H=OFF
    -DHAVE_SYS_MKDEV_H=OFF
    -DHAVE_SYS_MOUNT_H=OFF
    -DHAVE_SYS_POLL_H=OFF
    -DHAVE_SYS_RICHACL_H=OFF
    -DHAVE_SYS_SELECT_H=OFF
    -DHAVE_SYS_STATFS_H=OFF
    -DHAVE_SYS_STATVFS_H=OFF
    -DHAVE_SYS_SYSMACROS_H=OFF
    -DHAVE_SYS_UTSNAME_H=OFF
    -DHAVE_SYS_VFS_H=OFF
    -DHAVE_SYS_WAIT_H=OFF
    -DHAVE_SYS_XATTR_H=OFF
    -DHAVE_TCGETATTR=OFF
    -DHAVE_TCSETATTR=OFF
    -DHAVE_TIMEGM=OFF
    -DHAVE_UID_T=OFF
    -DHAVE_UNLINKAT=OFF
    -DHAVE_UNSETENV=OFF
    -DHAVE_UTIMENSAT=OFF
    -DHAVE_UTIMES=OFF
    -DHAVE_VFORK=OFF
    -DHAVE_WORKING_EXT2_IOC_GETFLAGS=OFF
    -DHAVE_WORKING_FS_IOC_GETFLAGS=OFF
    -DID_T=OFF
    -DLIBMD_FOUND=OFF
    -DMAJOR_IN_MKDEV=OFF
    -DMAJOR_IN_SYSMACROS=OFF
)

set(libsdl2_force_skip_check
    ${libsdl2_force_skip_check}
    -DCHECK_CPU_ARCHITECTURE_ARM32=OFF
    -DCHECK_CPU_ARCHITECTURE_ARM64EC=OFF
    -DCHECK_CPU_ARCHITECTURE_LOONGARCH64=OFF
    -DCHECK_CPU_ARCHITECTURE_X86=OFF
    -DHAVE_GCC_WALL=ON
    -DHAVE_GCC_WUNDEF=ON
    -DHAVE_GCC_WDOCUMENTATION=ON
    -DHAVE_GCC_WDECLARATION_AFTER_STATEMENT=ON
    -DHAVE_GCC_ATOMICS=ON
    -DHAVE_GCC_FVISIBILITY=ON
    -DHAVE_GCC_WSHADOW=ON
    -DHAVE_GCC_WUNUSED_LOCAL_TYPEDEFS=ON
    -DHAVE_ALTIVEC_H_HDR=OFF
    -DCPU_SUPPORTS_ALTIVEC=OFF
    -DHAVE_MPROTECT=OFF
    -DHAVE_ALLOCA1=OFF
    -DHAVE_ALLOCA_H=OFF
    -DHAVE_BCOPY=OFF
    -DHAVE_ELF_AUX_INFO=OFF
    -DHAVE_GETAUXVAL=OFF
    -DHAVE_INDEX=OFF
    -DHAVE_MEMFD_CREATE=OFF
    -DHAVE_NANOSLEEP=OFF
    -DHAVE_POLL=OFF
    -DHAVE_POSIX_FALLOCATE=OFF
    -DHAVE_RINDEX=OFF
    -DHAVE_SA_SIGACTION=OFF
    -DHAVE_SETENV=OFF
    -DHAVE_SIGACTION=OFF
    -DHAVE_STRCASESTR=OFF
    -DHAVE_STRLCAT=OFF
    -DHAVE_STRLCPY=OFF
    -DHAVE_SYSCONF=OFF
    -DHAVE_SYSCTLBYNAME=OFF
    -DHAVE_UNSETENV=OFF
    -DHAVE_WCSCASECMP=OFF
    -DHAVE_WCSLCAT=OFF
    -DHAVE_WCSLCPY=OFF
    -DHAVE_WCSNCASECMP=OFF
    -DHAVE__UITOA=OFF
    -DICONV_IN_LIBC=OFF
    -DLIBC_IS_GLIBC=OFF
    -DICONV_IN_LIBICONV=ON
    -DSTDC_HEADERS=ON
    -DHAVE_ABS=ON
    -DHAVE_ACOS=ON
    -DHAVE_ACOSF=ON
    -DHAVE_ALLOCA2=ON
    -DHAVE_ALLOCA3=ON
    -DHAVE_ASIN=ON
    -DHAVE_ASINF=ON
    -DHAVE_ATAN=ON
    -DHAVE_ATAN2=ON
    -DHAVE_ATAN2F=ON
    -DHAVE_ATANF=ON
    -DHAVE_ATOF=ON
    -DHAVE_ATOI=ON
    -DHAVE_AUDIOCLIENT_H=ON
    -DHAVE_BSEARCH=ON
    -DHAVE_CALLOC=ON
    -DHAVE_CEIL=ON
    -DHAVE_CEILF=ON
    -DHAVE_COPYSIGN=ON
    -DHAVE_COPYSIGNF=ON
    -DHAVE_COS=ON
    -DHAVE_COSF=ON
    -DHAVE_CTYPE_H=ON
    -DHAVE_D3D11_H=ON
    -DHAVE_D3D12_H=ON
    -DHAVE_D3D_H=ON
    -DHAVE_DDRAW_H=ON
    -DHAVE_DINPUT_H=ON
    -DHAVE_DSOUND_H=ON
    -DHAVE_DXGI_H=ON
    -DHAVE_EXP=ON
    -DHAVE_EXPF=ON
    -DHAVE_FABS=ON
    -DHAVE_FABSF=ON
    -DHAVE_FLOAT_H=ON
    -DHAVE_FLOOR=ON
    -DHAVE_FLOORF=ON
    -DHAVE_FMOD=ON
    -DHAVE_FMODF=ON
    -DHAVE_FOPEN64=ON
    -DHAVE_FREE=ON
    -DHAVE_FSEEKO=ON
    -DHAVE_FSEEKO64=ON
    -DHAVE_GETENV=ON
    -DHAVE_ICONV_H=ON
    -DHAVE_IMMINTRIN_H=ON
    -DHAVE_INTTYPES_H=ON
    -DHAVE_ITOA=ON
    -DHAVE_LIBM=ON
    -DHAVE_LIMITS_H=ON
    -DHAVE_LOG=ON
    -DHAVE_LOG10=ON
    -DHAVE_LOG10F=ON
    -DHAVE_LOGF=ON
    -DHAVE_LROUND=ON
    -DHAVE_LROUNDF=ON
    -DHAVE_MALLOC=ON
    -DHAVE_MALLOC_H=ON
    -DHAVE_MATH_H=ON
    -DHAVE_MEMCMP=ON
    -DHAVE_MEMCPY=ON
    -DHAVE_MEMMOVE=ON
    -DHAVE_MEMORY_H=ON
    -DHAVE_MEMSET=ON
    -DHAVE_MMDEVICEAPI_H=ON
    -DHAVE_M_PI=ON
    -DHAVE_NO_UNDEFINED=ON
    -DHAVE_POW=ON
    -DHAVE_POWF=ON
    -DHAVE_PUTENV=ON
    -DHAVE_QSORT=ON
    -DHAVE_REALLOC=ON
    -DHAVE_ROAPI_H=ON
    -DHAVE_ROUND=ON
    -DHAVE_ROUNDF=ON
    -DHAVE_SCALBN=ON
    -DHAVE_SCALBNF=ON
    -DHAVE_SENSORSAPI_H=ON
    -DHAVE_SETJMP=ON
    -DHAVE_SHELLSCALINGAPI_H=ON
    -DHAVE_SIGNAL_H=ON
    -DHAVE_SIN=ON
    -DHAVE_SINF=ON
    -DHAVE_SQRT=ON
    -DHAVE_SQRTF=ON
    -DHAVE_SSCANF=ON
    -DHAVE_STDARG_H=ON
    -DHAVE_STDDEF_H=ON
    -DHAVE_STDINT_H=ON
    -DHAVE_STDIO_H=ON
    -DHAVE_STDLIB_H=ON
    -DHAVE_STRCASECMP=ON
    -DHAVE_STRCHR=ON
    -DHAVE_STRCMP=ON
    -DHAVE_STRINGS_H=ON
    -DHAVE_STRING_H=ON
    -DHAVE_STRLEN=ON
    -DHAVE_STRNCASECMP=ON
    -DHAVE_STRNCMP=ON
    -DHAVE_STRRCHR=ON
    -DHAVE_STRSTR=ON
    -DHAVE_STRTOD=ON
    -DHAVE_STRTOK_R=ON
    -DHAVE_STRTOL=ON
    -DHAVE_STRTOLL=ON
    -DHAVE_STRTOUL=ON
    -DHAVE_STRTOULL=ON
    -DHAVE_SYS_TYPES_H=ON
    -DHAVE_TAN=ON
    -DHAVE_TANF=ON
    -DHAVE_TPCSHRD_H=ON
    -DHAVE_TRUNC=ON
    -DHAVE_TRUNCF=ON
    -DHAVE_VSNPRINTF=ON
    -DHAVE_VSSCANF=ON
    -DHAVE_WCHAR_H=ON
    -DHAVE_WCSCMP=ON
    -DHAVE_WCSDUP=ON
    -DHAVE_WCSLEN=ON
    -DHAVE_WCSNCMP=ON
    -DHAVE_WCSSTR=ON
    -DHAVE_WIN32_CC=ON
    -DHAVE_WINDOWS_GAMING_INPUT_H=ON
    -DHAVE_XINPUT_H=ON
    -DHAVE__EXIT=ON
    -DHAVE__I64TOA=ON
    -DHAVE__LTOA=ON
    -DHAVE__STRICMP=ON
    -DHAVE__STRLWR=ON
    -DHAVE__STRNICMP=ON
    -DHAVE__STRREV=ON
    -DHAVE__STRUPR=ON
    -DHAVE__UI64TOA=ON
    -DHAVE__ULTOA=ON
    -DHAVE__WCSDUP=ON
    -DHAVE__WCSICMP=ON
    -DHAVE__WCSNICMP=ON
)

set(c-ares_force_skip_check
    -DHAVE_AF_INET6=ON
    -DHAVE_ASSERT_H=ON
    -DHAVE_CLOSESOCKET=ON
    -DHAVE_CONNECT=ON
    -DHAVE_CONVERTINTERFACEINDEXTOLUID=ON
    -DHAVE_CONVERTINTERFACELUIDTONAMEA=ON
    -DHAVE_ERRNO_H=ON
    -DHAVE_FCNTL_H=ON
    -DHAVE_FIONBIO=ON
    -DHAVE_FREEADDRINFO=ON
    -DHAVE_GETADDRINFO=ON
    -DHAVE_GETBESTROUTE2=ON
    -DHAVE_GETENV=ON
    -DHAVE_GETHOSTNAME=ON
    -DHAVE_GETNAMEINFO=ON
    -DHAVE_GETQUEUEDCOMPLETIONSTATUSEX=ON
    -DHAVE_GETTIMEOFDAY=ON
    -DHAVE_IF_INDEXTONAME=ON
    -DHAVE_IF_NAMETOINDEX=ON
    -DHAVE_INTTYPES_H=ON
    -DHAVE_IOCTLSOCKET=ON
    -DHAVE_IPHLPAPI_H=ON
    -DHAVE_LIMITS_H=ON
    -DHAVE_LONGLONG=ON
    -DHAVE_MALLOC_H=ON
    -DHAVE_MEMORY_H=ON
    -DHAVE_MSWSOCK_H=ON
    -DHAVE_NETIOAPI_H=ON
    -DHAVE_NOTIFYIPINTERFACECHANGE=ON
    -DHAVE_NTDEF_H=ON
    -DHAVE_NTSTATUS_H=ON
    -DHAVE_OVERLAPPED_ENTRY=ON
    -DHAVE_PF_INET6=ON
    -DHAVE_RECV=ON
    -DHAVE_RECVFROM=ON
    -DHAVE_REGISTERWAITFORSINGLEOBJECT=ON
    -DHAVE_REGNOTIFYCHANGEKEYVALUE=ON
    -DHAVE_SEND=ON
    -DHAVE_SENDTO=ON
    -DHAVE_SETFILECOMPLETIONNOTIFICATIONMODES=ON
    -DHAVE_SETSOCKOPT=ON
    -DHAVE_SIGNAL_H=ON
    -DHAVE_SOCKET=ON
    -DHAVE_SOCKLEN_T=ON
    -DHAVE_SSIZE_T=ON
    -DHAVE_STAT=ON
    -DHAVE_STDBOOL_H=ON
    -DHAVE_STDINT_H=ON
    -DHAVE_STDLIB_H=ON
    -DHAVE_STRCASECMP=ON
    -DHAVE_STRCMPI=ON
    -DHAVE_STRDUP=ON
    -DHAVE_STRICMP=ON
    -DHAVE_STRINGS_H=ON
    -DHAVE_STRING_H=ON
    -DHAVE_STRNCASECMP=ON
    -DHAVE_STRNICMP=ON
    -DHAVE_STRNLEN=ON
    -DHAVE_STRUCT_ADDRINFO=ON
    -DHAVE_STRUCT_IN6_ADDR=ON
    -DHAVE_STRUCT_SOCKADDR_IN6=ON
    -DHAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID=ON
    -DHAVE_STRUCT_SOCKADDR_STORAGE=ON
    -DHAVE_STRUCT_TIMEVAL=ON
    -DHAVE_SYS_PARAM_H=ON
    -DHAVE_SYS_STAT_H=ON
    -DHAVE_SYS_TIME_H=ON
    -DHAVE_SYS_TYPES_H=ON
    -DHAVE_TIME_H=ON
    -DHAVE_TYPE_SOCKET=ON
    -DHAVE_UNISTD_H=ON
    -DHAVE_WINDOWS_H=ON
    -DHAVE_WINSOCK2_H=ON
    -DHAVE_WINSOCK_H=ON
    -DHAVE_WINTERNL_H=ON
    -DHAVE_WS2TCPIP_H=ON
    -DHAVE_WSAIOCTL=ON
    -DHAVE__O0=ON
    -DHAVE__Qunused_arguments=ON
    -DHAVE__Waggregate_return=ON
    -DHAVE__Wall=ON
    -DHAVE__Wcast_align=ON
    -DHAVE__Wcast_qual=ON
    -DHAVE__Wconversion=ON
    -DHAVE__Wdeclaration_after_statement=ON
    -DHAVE__Wdouble_promotion=ON
    -DHAVE__Werror_implicit_function_declaration=ON
    -DHAVE__Werror_implicit_int=ON
    -DHAVE__Werror_partial_availability=ON
    -DHAVE__Wextra=ON
    -DHAVE__Wfloat_equal=ON
    -DHAVE__Wformat_security=ON
    -DHAVE__Winit_self=ON
    -DHAVE__Wjump_misses_init=ON
    -DHAVE__Wmissing_braces=ON
    -DHAVE__Wmissing_declarations=ON
    -DHAVE__Wmissing_format_attribute=ON
    -DHAVE__Wmissing_include_dirs=ON
    -DHAVE__Wmissing_prototypes=ON
    -DHAVE__Wnested_externs=ON
    -DHAVE__Wno_long_long=ON
    -DHAVE__Wold_style_definition=ON
    -DHAVE__Wpacked=ON
    -DHAVE__Wpedantic=ON
    -DHAVE__Wpointer_arith=ON
    -DHAVE__Wredundant_decls=ON
    -DHAVE__Wshadow=ON
    -DHAVE__Wsign_conversion=ON
    -DHAVE__Wstrict_overflow=ON
    -DHAVE__Wstrict_prototypes=ON
    -DHAVE__Wundef=ON
    -DHAVE__Wunreachable_code=ON
    -DHAVE__Wunused=ON
    -DHAVE__Wvariadic_macros=ON
    -DHAVE__Wvla=ON
    -DHAVE__Wwrite_strings=ON
    -DHAVE__fcolor_diagnostics=ON
    -DHAVE__fdiagnostics_color_always=ON
    -DHAVE__fno_omit_frame_pointer=OFF
    -DHAVE_ARC4RANDOM_BUF=OFF
    -DHAVE_ARPA_INET_H=OFF
    -DHAVE_ARPA_NAMESER_COMPAT_H=OFF
    -DHAVE_ARPA_NAMESER_H=OFF
    -DHAVE_AVAILABILITYMACROS_H=OFF
    -DHAVE_CLOCK_GETTIME_MONOTONIC=OFF
    -DHAVE_CLOSESOCKET_CAMEL=OFF
    -DHAVE_CONNECTX=OFF
    -DHAVE_DLFCN_H=OFF
    -DHAVE_EPOLL=OFF
    -DHAVE_FCNTL=OFF
    -DHAVE_GETIFADDRS=OFF
    -DHAVE_GETRANDOM=OFF
    -DHAVE_GETSERVBYNAME_R=OFF
    -DHAVE_GETSERVBYPORT_R=OFF
    -DHAVE_GHBN_LIBSOCKET=OFF
    -DHAVE_IFADDRS_H=OFF
    -DHAVE_INET_NET_PTON=OFF
    -DHAVE_IOCTL=OFF
    -DHAVE_IOCTLSOCKET_CAMEL=OFF
    -DHAVE_IOCTL_SIOCGIFADDR=OFF
    -DHAVE_KQUEUE=OFF
    -DHAVE_LIBNETWORK=OFF
    -DHAVE_LIBNSL=OFF
    -DHAVE_LIBRT=OFF
    -DHAVE_MEMMEM=OFF
    -DHAVE_MSG_NOSIGNAL=OFF
    -DHAVE_NETDB_H=OFF
    -DHAVE_NETINET6_IN6_H=OFF
    -DHAVE_NETINET_IN_H=OFF
    -DHAVE_NETINET_TCP_H=OFF
    -DHAVE_NET_IF_H=OFF
    -DHAVE_O_NONBLOCK=OFF
    -DHAVE_PIPE=OFF
    -DHAVE_PIPE2=OFF
    -DHAVE_POLL=OFF
    -DHAVE_POLL_H=OFF
    -DHAVE_RES_SERVICENAME_IN_LIBRESOLV=OFF
    -DHAVE_SOCKET_H=OFF
    -DHAVE_SOCKET_LIBSOCKET=OFF
    -DHAVE_SO_NONBLOCK=OFF
    -DHAVE_STRNCMPI=OFF
    -DHAVE_STROPTS_H=OFF
    -DHAVE_SYS_EPOLL_H=OFF
    -DHAVE_SYS_EVENT_H=OFF
    -DHAVE_SYS_IOCTL_H=OFF
    -DHAVE_SYS_RANDOM_H=OFF
    -DHAVE_SYS_SELECT_H=OFF
    -DHAVE_SYS_SOCKET_H=OFF
    -DHAVE_SYS_SOCKIO_H=OFF
    -DHAVE_SYS_UIO_H=OFF
    -DHAVE_WRITEV=OFF
    -DHAVE__Wimplicit_fallthrough_3=OFF
    -DHAVE__Wlogical_op=OFF
    -DHAVE__Wno_coverage_mismatch=OFF
    -DHAVE__Wtrampolines=OFF
    -DHAVE___SYSTEM_PROPERTY_GET=OFF
)

set(bzip_force_skip_check
    -DHAVE_FCNTL_H=ON
    -DHAVE_INTTYPES_H=ON
    -DHAVE_LIMITS_H=ON
    -DHAVE_SIZEOF_SSIZE_T=ON
    -DHAVE_STDDEF_H=ON
    -DHAVE_STDINT_H=ON
    -DHAVE_SYS_TIME_H=ON
    -DHAVE_SYS_TYPES_H=ON
    -DHAVE_TIME_H=ON
    -DHAVE_UNISTD_H=ON
    -DHAVE__EXIT=ON
    -DC_FLAG__Waddress=ON
    -DC_FLAG__Wall=ON
    -DC_FLAG__Wattributes=ON
    -DC_FLAG__Wcast_align=ON
    -DC_FLAG__Wconversion=ON
    -DC_FLAG__Wdeclaration_after_statement=ON
    -DC_FLAG__Wdiv_by_zero=ON
    -DC_FLAG__Wempty_body=ON
    -DC_FLAG__Wendif_labels=ON
    -DC_FLAG__Wextra=ON
    -DC_FLAG__Wfloat_equal=ON
    -DC_FLAG__Wformat_nonliteral=ON
    -DC_FLAG__Wformat_security=ON
    -DC_FLAG__Wheader_guard=ON
    -DC_FLAG__Winline=ON
    -DC_FLAG__Wlanguage_extension_token=ON
    -DC_FLAG__Wmissing_declarations=ON
    -DC_FLAG__Wmissing_field_initializers=ON
    -DC_FLAG__Wmissing_noreturn=ON
    -DC_FLAG__Wmissing_prototypes=ON
    -DC_FLAG__Wmissing_variable_declarations=ON
    -DC_FLAG__Wnested_externs=ON
    -DC_FLAG__Wno_format_nonliteral=ON
    -DC_FLAG__Wpointer_arith=ON
    -DC_FLAG__Wpragmas=ON
    -DC_FLAG__Wredundant_decls=ON
    -DC_FLAG__Wshadow=ON
    -DC_FLAG__Wshorten_64_to_32=ON
    -DC_FLAG__Wsign_conversion=ON
    -DC_FLAG__Wstrict_prototypes=ON
    -DC_FLAG__Wundef=ON
    -DC_FLAG__Wunreachable_code=ON
    -DC_FLAG__Wunreachable_code_break=ON
    -DC_FLAG__Wunused_macros=ON
    -DC_FLAG__Wunused_parameter=ON
    -DC_FLAG__Wvla=ON
    -DC_FLAG__Wwrite_strings=ON
    -DC_FLAG__Wclobbered=OFF
    -DC_FLAG__Wextended_offsetof=OFF
    -DHAVE_ACCEPT4=ON
    -DHAVE_ARPA_INET_H=OFF
    -DHAVE_DECL_INITGROUPS=OFF
    -DHAVE_DECL_INITGROUPS2=OFF
    -DHAVE_MKOSTEMP=ON
    -DHAVE_NETDB_H=OFF
    -DHAVE_NETINET_IN_H=OFF
    -DHAVE_PWD_H=OFF
    -DHAVE_STRUCT_TM_TM_GMTOFF=OFF
    -DHAVE_SYSLOG_H=OFF
    -DHAVE_SYS_SOCKET_H=OFF
)

set(nghttp2_force_skip_check
    -DCMAKE_DISABLE_FIND_PACKAGE_Libngtcp2_crypto_quictls=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Systemd=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Jansson=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Libevent=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Jemalloc=ON
    -DHAVE_FCNTL_H=ON
    -DHAVE_GETTICKCOUNT64=ON
    -DHAVE_INTTYPES_H=ON
    -DHAVE_LIMITS_H=ON
    -DHAVE_SIZEOF_SSIZE_T=ON
    -DHAVE_STDDEF_H=ON
    -DHAVE_STDINT_H=ON
    -DHAVE_SYS_TIME_H=ON
    -DHAVE_SYS_TYPES_H=ON
    -DHAVE_UNISTD_H=ON
    -DHAVE_WINDOWS_H=ON
    -DHAVE__EXIT=ON
    -DHAVE_ACCEPT4=OFF
    -DHAVE_ARPA_INET_H=OFF
    -DHAVE_CLOCK_GETTIME=OFF
    -DHAVE_DECL_CLOCK_MONOTONIC=OFF
    -DHAVE_DECL_INITGROUPS=OFF
    -DHAVE_DECL_INITGROUPS2=OFF
    -DHAVE_MKOSTEMP=OFF
    -DHAVE_NETDB_H=OFF
    -DHAVE_NETINET_IN_H=OFF
    -DHAVE_NETINET_IP_H=OFF
    -DHAVE_PIPE2=OFF
    -DHAVE_PWD_H=OFF
    -DHAVE_STRUCT_TM_TM_GMTOFF=OFF
    -DHAVE_SYS_SOCKET_H=OFF
    -DHAVE_SYSLOG_H=OFF
)

set(xz_force_skip_check
    ${xz_force_skip_check}
    -DASM_I386_DEFAULT=OFF
    -DHAVE___BUILTIN_ASSUME_ALIGNED=ON
    -DHAVE___BUILTIN_BSWAPXX=ON
    -DHAVE_CAP_RIGHTS_LIMIT=OFF
    -DHAVE_CLOCK_GETTIME_LIBRT=OFF
    -DHAVE_CLOCK_GETTIME=OFF
    -DHAVE_COMPILER_OPTION_-Waggregate-return=ON
    -DHAVE_COMPILER_OPTION_-Wall=ON
    -DHAVE_COMPILER_OPTION_-Walloc-zero=OFF
    -DHAVE_COMPILER_OPTION_-Warray-bounds-pointer-arithmetic=ON
    -DHAVE_COMPILER_OPTION_-Wassign-enum=ON
    -DHAVE_COMPILER_OPTION_-Wbad-function-cast=ON
    -DHAVE_COMPILER_OPTION_-Wc11-extensions=ON
    -DHAVE_COMPILER_OPTION_-Wc2x-compat=ON
    -DHAVE_COMPILER_OPTION_-Wc2x-extensions=ON
    -DHAVE_COMPILER_OPTION_-Wc99-compat=ON
    -DHAVE_COMPILER_OPTION_-Wconditional-uninitialized=ON
    -DHAVE_COMPILER_OPTION_-Wdate-time=ON
    -DHAVE_COMPILER_OPTION_-Wdocumentation=ON
    -DHAVE_COMPILER_OPTION_-Wduplicate-enum=ON
    -DHAVE_COMPILER_OPTION_-Wduplicated-cond=OFF
    -DHAVE_COMPILER_OPTION_-Wempty-translation-unit=ON
    -DHAVE_COMPILER_OPTION_-Wextra=ON
    -DHAVE_COMPILER_OPTION_-Wflexible-array-extensions=ON
    -DHAVE_COMPILER_OPTION_-Wfloat-conversion=ON
    -DHAVE_COMPILER_OPTION_-Wfloat-equal=ON
    -DHAVE_COMPILER_OPTION_-Wformat_2=ON
    -DHAVE_COMPILER_OPTION_-Wimplicit-fallthrough_5=OFF
    -DHAVE_COMPILER_OPTION_-Wimplicit-fallthrough=ON
    -DHAVE_COMPILER_OPTION_-Winit-self=ON
    -DHAVE_COMPILER_OPTION_-Wlogical-op=OFF
    -DHAVE_COMPILER_OPTION_-Wmissing-declarations=ON
    -DHAVE_COMPILER_OPTION_-Wmissing-include-dirs=ON
    -DHAVE_COMPILER_OPTION_-Wmissing-prototypes=ON
    -DHAVE_COMPILER_OPTION_-Wmissing-variable-declarations=ON
    -DHAVE_COMPILER_OPTION_-Wnewline-eof=ON
    -DHAVE_COMPILER_OPTION_-Wold-style-definition=ON
    -DHAVE_COMPILER_OPTION_-Wpointer-arith=ON
    -DHAVE_COMPILER_OPTION_-Wpre-c2x-compat=ON
    -DHAVE_COMPILER_OPTION_-Wredundant-decls=ON
    -DHAVE_COMPILER_OPTION_-Wshadow=ON
    -DHAVE_COMPILER_OPTION_-Wshift-overflow_2=OFF
    -DHAVE_COMPILER_OPTION_-Wshift-sign-overflow=ON
    -DHAVE_COMPILER_OPTION_-Wsign-conversion=ON
    -DHAVE_COMPILER_OPTION_-Wstrict-overflow_3=ON
    -DHAVE_COMPILER_OPTION_-Wstrict-prototypes=ON
    -DHAVE_COMPILER_OPTION_-Wstring-conversion=ON
    -DHAVE_COMPILER_OPTION_-Wundef=ON
    -DHAVE_COMPILER_OPTION_-Wvla=ON
    -DHAVE_COMPILER_OPTION_-Wwrite-strings=ON
    -DHAVE_FUNC_ATTRIBUTE_CONSTRUCTOR=ON
    -DHAVE_GETOPT_LONG=ON
    -DHAVE_LINUX_LANDLOCK=OFF
    -DHAVE_LOONGARCH_CRC32=OFF
    -DHAVE_PLEDGE=OFF
    -DHAVE_ELF_AUX_INFO=OFF
    -DHAVE_GETAUXVAL=OFF
    -DHAVE_SYSCTLBYNAME=OF
    -DTUKLIB_LARGE_FILE_SUPPORT_BY_DEFAULT=OFF
    -DTUKLIB_LARGE_FILE_SUPPORT_WITH_FOB64=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Gettext=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Intl=ON
)

set(libjxl_force_skip_check
    ${libjxl_force_skip_check}
    -DCXX_MACRO_PREFIX_MAP=OFF
    -DCXX_NO_RTTI_SUPPORTED=ON
    -DCXX_FUZZERS_SUPPORTED=OFF
    -DCMAKE_CXX_LINK_PIE_SUPPORTED=OFF
    -DCMAKE_CXX_LINK_NO_PIE_SUPPORTED=OFF
    -DLIBCXX=ON
    -DLIBSTDCXX=OFF
    -DATOMICS_LOCK_FREE_INSTRUCTIONS=ON
    -DCOMPILER_HAS_DEPRECATED_ATTR=ON
    -DLINKER_SUPPORT_EXCLUDE_LIBS=OFF
    -DJXL_HWY_DISABLED_TARGETS_FORCED=OFF
)

set(openal_force_skip_check
    ${openal_force_skip_check}
    -DHAVE_DLFCN_H=OFF
    -DHAVE_FNO_MATH_ERRNO=ON
    -DHAVE_FTRIVIAL_AUTO_VAR_INIT=OFF
    -DHAVE_LIBATOMIC=OFF
    -DHAVE_LIBCXX=OFF
    -DHAVE_LIBDL=OFF
    -DHAVE_LIBM=ON
    -DHAVE_LIBRT=OFF
    -DHAVE_LIBSTDCXX=OFF
    -DHAVE_MSSTL=OFF
    -DHAVE_SHGETKNOWNFOLDERPATH_NO_NTDDI=ON
    -DHAVE_WNO_INTERFERENCE_SIZE=OFF
    -DHAVE_STDC_FORMAT_MACROS=ON
    -DHAVE_DSOUND_H=ON
    -DHAVE_GUIDDEF_H=ON
    -DHAVE_INTRIN_H=ON
    -DHAVE_MMDEVICEAPI_H=ON
    -DHAVE_PROC_PIDPATH=OFF
    -DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_OpenSL=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_JACK=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_PortAudio=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio=ON
)

set(libssh_force_skip_check
    -DREQUIRED_FLAGS_WERROR=OFF
    -DHAVE_ARGP_H=OFF
    -DHAVE_ARGP_PARSE=OFF
    -DHAVE_ARPA_INET_H=OFF
    -DHAVE_BYTESWAP_H=OFF
    -DHAVE_COMPILER__FUNCTION__=ON
    -DHAVE_COMPILER__FUNC__=ON
    -DHAVE_CONSTRUCTOR_ATTRIBUTE=ON
    -DHAVE_DESTRUCTOR_ATTRIBUTE=ON
    -DHAVE_EXPLICIT_BZERO=OFF
    -DHAVE_FALLTHROUGH_ATTRIBUTE=ON
    -DHAVE_GCC_THREAD_LOCAL_STORAGE=ON
    -DHAVE_GCC_VOLATILE_MEMORY_PROTECTION=ON
    -DHAVE_GETADDRINFO=ON
    -DHAVE_GLOB_H=OFF
    -DHAVE_HTONLL=OFF
    -DHAVE_IFADDRS_H=OFF
    -DHAVE_IO_H=ON
    -DHAVE_ISBLANK=ON
    -DHAVE_LD_VERSION_SCRIPT=OFF
    -DHAVE_LIBUTIL_H=OFF
    -DHAVE_MEMSET_S=OFF
    -DHAVE_MSC_THREAD_LOCAL_STORAGE=ON
    -DHAVE_NTOHLL=OFF
    -DHAVE_OPENSSL_AES_H=ON
    -DHAVE_OPENSSL_DES_H=ON
    -DHAVE_OPENSSL_ECDH_H=ON
    -DHAVE_OPENSSL_ECDSA_H=ON
    -DHAVE_OPENSSL_EC_H=ON
    -DHAVE_OPENSSL_EVP_CHACHA20=OFF
    -DHAVE_OPENSSL_EVP_KDF_CTX_NEW=OFF
    -DHAVE_OPENSSL_EVP_KDF_CTX_NEW_ID=OFF
    -DHAVE_OPENSSL_FIPS_MODE=OFF
    -DHAVE_OPENSSL_RAND_PRIV_BYTES=OFF
    -DHAVE_PTY_H=OFF
    -DHAVE_SECURE_ZERO_MEMORY=ON
    -DHAVE_SELECT=ON
    -DHAVE_SNPRINTF=ON
    -DHAVE_STDINT_H=ON
    -DHAVE_STRNCPY=ON
    -DHAVE_STRNDUP=OFF
    -DHAVE_STRTOULL=ON
    -DHAVE_SYS_PARAM_H=ON
    -DHAVE_SYS_TIME_H=ON
    -DHAVE_SYS_UTIME_H=ON
    -DHAVE_TERMIOS_H=OFF
    -DHAVE_UNISTD_H=ON
    -DHAVE_UTIL_H=OFF
    -DHAVE_UTMP_H=OFF
    -DHAVE_VALGRIND_VALGRIND_H=OFF
    -DHAVE_VSNPRINTF=ON
    -DHAVE_WEAK_ATTRIBUTE=ON
    -DHAVE_WS2TCPIP_H=ON
    -DHAVE_WSPIAPI_H=ON
    -DHAVE__SNPRINTF=ON
    -DHAVE__SNPRINTF_S=ON
    -DHAVE__STRTOUI64=ON
    -DHAVE__VSNPRINTF=ON
    -DHAVE__VSNPRINTF_S=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_NSIS=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_NaCl=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Argp=ON
    -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
)

set(libwebp_force_skip_check
    ${libwebp_force_skip_check}
    -DWEBP_HAVE_FLAG_MIPS32=OFF
    -DWEBP_HAVE_FLAG_MIPS_DSP_R2=OFF
    -DWEBP_HAVE_FLAG_MSA=OFF
    -DHAVE_BUILTIN_BSWAP16=ON
    -DHAVE_BUILTIN_BSWAP32=ON
    -DHAVE_BUILTIN_BSWAP64=ON
    -DHAVE_MATH_LIBRARY=ON
    -DHAVE_SHLWAPI_H=ON
    -DHAVE_UNISTD_H=ON
    -DHAVE_WINCODEC_H=ON
    -DHAVE_WINDOWS_H=ON
    -DHAVE_GLUT_GLUT_H=OFF
    -DHAVE_GL_GLUT_H=OFF
    -DHAVE_OPENGL_GLUT_H=OFF
)

set(zlib_force_skip_check
    ${zlib_force_skip_check}
    -DHAVE_ATTRIBUTE_ALIGNED=ON
    -DHAVE_ATTRIBUTE_VISIBILITY_HIDDEN=ON
    -DHAVE_ATTRIBUTE_VISIBILITY_INTERNAL=ON
    -DHAVE_BUILTIN_ASSUME_ALIGNED=ON
    -DHAVE_BUILTIN_CTZ=ON
    -DHAVE_BUILTIN_CTZLL=ON
    -DHAVE_PTRDIFF_T=ON
    -DHAVE_FSEEKO=ON
    -DHAVE_STDDEF_H=ON
    -DHAVE_STDINT_H=ON
    -DHAVE_STRERROR=ON
    -DHAVE_UNISTD_H=ON
    -DHAVE_SYS_TYPES_H=ON
    -DHAVE_NO_INTERPOSITION=ON
    -DHAVE_SYS_AUXV_H=OFF
    -DHAVE_SYS_SDT_H=OFF
    -DHAVE_LINUX_AUXVEC_H=OFF
    -DHAVE_NO_PEDANTIC_MS_FORMAT=OFF
)

set(svtav1_force_skip_check
    ${svtav1_force_skip_check}
    -DCXX_FLAG_Wall=ON
    -DCXX_FLAG_Wextra=ON
    -DCXX_FLAG_Wformat=ON
    -DCXX_FLAG_Wformat_security=ON
    -DC_FLAG_Wall=ON
    -DC_FLAG_Wextra=ON
    -DC_FLAG_Wformat=ON
    -DC_FLAG_Wformat_security=ON
    -DC_FLAG_fno_asynchronous_unwind_tables=ON
    -DHAVE_BUILTIN_EXPECT=ON
    -DHAVE_STRCPY_S=ON
    -DHAVE_STRNCPY_S=ON
    -DHAVE_STRNLEN_S=OFF
    -DHAVE_VALGRIND_H=OFF
    -DHAVE_ELF_AUX_INFO=OFF
)

set(harfbuzz_force_skip_check
    -DHAVE_ATEXIT=ON
    -DHAVE_DWRITE_1_H=ON
    -DHAVE_FT_DONE_MM_VAR=ON
    -DHAVE_FT_GET_TRANSFORM=ON
    -DHAVE_FT_GET_VAR_BLEND_COORDINATES=ON
    -DHAVE_FT_SET_VAR_BLEND_COORDINATES=ON
    -DHAVE_GETPAGESIZE=OFF
    -DHAVE_ISATTY=ON
    -DHAVE_MMAP=OFF
    -DHAVE_MPROTECT=OFF
    -DHAVE_STDBOOL_H=ON
    -DHAVE_SYSCONF=OFF
    -DHAVE_SYS_MMAN_H=OFF
    -DHAVE_UNISTD_H=ON
    -DCOMPILER_SUPPORTS_CXX11=ON
    -DCXX_SUPPORTS_FLAG_BSYMB_FUNCS=ON
)
set(highway_force_skip_check
    -DATOMICS_LOCK_FREE_INSTRUCTIONS=ON
    -DHWY_HAVE_WIN32_SYNCHRONIZATION_LIB=ON
    -DHWY_EMSCRIPTEN=OFF
    -DHWY_RISCV=OFF
    -DHAVE_ASM_HWCAP_H=OFF
    -DHAVE_SYS_AUXV_H=OFF
)

set(codec2_force_skip_check
    -DHAVE_ATAN2=ON
    -DHAVE_CEIL=ON
    -DHAVE_COS=ON
    -DHAVE_FLOOR=ON
    -DHAVE_GETOPT=ON
    -DHAVE_LOG10=ON
    -DHAVE_POW=ON
    -DHAVE_ROUND=ON
    -DHAVE_SIN=ON
    -DHAVE_SQRT=ON
    -DHAVE_STDLIB_H=ON
    -DHAVE_STRING_H=ON
    -D_GNU_SOURCE=OFF
)

set(libsrt_force_skip_check
    -DHAVE_CXX_ATOMIC=ON
    -DHAVE_CXX_ATOMIC_STATIC=ON
    -DHAVE_CXX_STD_PUT_TIME=ON
    -DHAVE_GCCATOMIC_INTRINSICS=ON
    -DHAVE_INET_PTON=ON
    -DHAVE_LIBATOMIC=OFF
    -DHAVE_LIBATOMIC_COMPILES=OFF
    -DHAVE_LIBATOMIC_COMPILES_STATIC=OFF
    -DHAVE_PTHREAD_ATFORK=OFF
    -DHAVE_PTHREAD_GETNAME_NP=OFF
    -DHAVE_PTHREAD_GETNAME_NP_IN_PTHREAD_NP_H=OFF
    -DHAVE_PTHREAD_SETNAME_NP=OFF
    -DHAVE_PTHREAD_SETNAME_NP_IN_PTHREAD_NP_H=OFF
)
